package com.jnzc.ocr.serv.shop.service;

import com.jnzc.ocr.common.bean.Tree;
import com.jnzc.ocr.dependencies.serv.mybatis.MybatisService;
import com.jnzc.ocr.serv.shop.entity.ShopProduct;
import com.jnzc.ocr.serv.shop.entity.ShopProductAttr;
import com.jnzc.ocr.serv.shop.entity.ShopProductSku;
import com.jnzc.ocr.serv.shop.filter.ShopProductSkuFilter;
import com.jnzc.ocr.serv.shop.vo.ShopProductSaveVo;
import com.jnzc.ocr.serv.shop.vo.ShopProductSkuSaveVo;
import com.jnzc.ocr.serv.shop.vo.ShopProductSkuVo;

import java.util.List;
import java.util.Map;

/**
 * @author zhangcm
 * @version 1.0, 2017-09-29
 */
public interface ShopProductSkuService extends MybatisService<ShopProductSku, ShopProductSkuFilter> {

    ShopProductSku find(Long id, Long shopId);

    ShopProductSku find(Long id, Long productId, Long shopId);

    List<ShopProductSku> list(List<Long> idList, Long shopId);

    Map<Long, ShopProductSku> listMap(List<Long> idList, Long shopId);

    List<ShopProductSku> list(Long productId, Long shopId);

    List<ShopProductSku> listWithAttr(Long productId, Long shopId, List<Tree<ShopProductAttr>> attrTree);

    List<Long> listIdByProductId(Long productId, Long shopId);

    List<ShopProductSkuVo> listVo(List<Long> idList, Long shopId);

    Map<Long, ShopProductSkuVo> listVoMap(List<Long> idList, Long shopId);

    void save(List<ShopProductSaveVo.Sku> paramList, ShopProduct product);

    void delete(Long productId, Long shopId);

    void delete(List<Long> idList, Long shopId);
}
